
#include <array>
#include <cassert>
#include <iostream>
using namespace std;
using real_t = double;
constexpr double One_third = 1.0 / 3.0;
template <typename T, int N> struct Step {
  std::array<T, N> *res, *w0, *w;
  T *dt;
  void init(const std::array<T, N> *residual, const T *dtime,
            std::array<T, N> *w_old, std::array<T, N> *w_current) {
    res = const_cast<std::array<T, N> *>(residual);
    dt = const_cast<T *>(dtime);
    w0 = w_old;
    w = w_current;
  }
};
/// 后续优化手动循环展开也行
template <typename T, int N> struct Step1 : public Step<T, N> {
  void operator()(int idx) {
    // w 与 w0一样
    for (int m = 0; m < 5; ++m)
      Step<T, N>::w[idx][m] =
          Step<T, N>::w[idx][m] + Step<T, N>::dt[idx] * Step<T, N>::res[idx][m];
  }
};
template <typename T, int N> struct Step2 : public Step<T, N> {
  void operator()(int idx) {
    for (int m = 0; m < 5; ++m)
      Step<T, N>::w[idx][m] =
          0.75 * Step<T, N>::w0[idx][m] +
          0.25 * (Step<T, N>::w[idx][m] +
                  Step<T, N>::dt[idx] * Step<T, N>::res[idx][m]);
  }
};
template <typename T, int N> struct Step3 : public Step<T, N> {
  void operator()(int idx) {
    for (int m = 0; m < 5; ++m)
      Step<T, N>::w[idx][m] =
          One_third * (Step<T, N>::w0[idx][m] +
                       2.0 * (Step<T, N>::w[idx][m] +
                              Step<T, N>::dt[idx] * Step<T, N>::res[idx][m]));
  }
};

struct iii {
  int a, b, c;
};

int main() {
  iii i;
  iii i2[2];
  cout << sizeof(i) << "  " << sizeof(i2) << endl;
  return 0;
}